package com.twu.biblioteca.Goods;

public class Goods {
    protected String name;

    public Goods(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || !(o instanceof Goods)) return false;

        Goods goods = (Goods) o;

        if (!goods.name.equals(goods.name)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }
}
